package com.sg.model.base.po;

import com.baomidou.mybatisplus.annotation.*;
import com.sg.framework.common.annotations.LikeFlag;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import lombok.experimental.Accessors;

import com.sg.framework.common.po.BaseEntity;
import jakarta.validation.constraints.NotNull;

import java.io.Serial;
import java.io.Serializable;
import java.io.Serial;
import java.util.Date;

/**
 * 此表主要用于业务表对象的内部属性版本化；用于有枚举值或状态的字段的设定；用于扩展做分类。
 * 无空间、无应用
 *
 * @author xxx
 */
@Data
@Accessors(chain = true)
@TableName("oms_base_metadata_object_property")   //1-1-04元数据对象属性表
public class MetadataObjectProperty implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;


    /**
     * 对象属性ID
     */
    @TableId(value = "object_property_id", type = IdType.ASSIGN_UUID)
    @NotNull(message = "objectPropertyId不能为空")
    private String objectPropertyId;
    /**
     * 业务对象ID
     */
    @TableField(value = "business_object_id")
    @NotNull(message = "业务对象ID不能为空")
    @Schema(description = "业务对象ID")
    private String businessObjectId;
    /**
     * 业务对象编码
     */
    @TableField(value = "business_object_code")
    @NotNull(message = "业务对象编码不能为空")
    @Schema(description = "业务对象编码")
    private String businessObjectCode;
    /**
     * 对象属性标识
     */
    @TableField(value = "object_property_code")
    @NotNull(message = "对象属性标识不能为空")
    @Schema(description = "对象属性标识")
    private String objectPropertyCode;
    /**
     * 对象属性名称
     */
    @TableField(value = "object_property_name")
    @NotNull(message = "对象属性名称不能为空")
    @Schema(description = "对象属性名称")
    @LikeFlag(likeType = "LIKE")
    private String objectPropertyName;
    /**
     * 对象属性类型 FIELD:字段 CLASS:分类 OTHER:其他
     */
    @TableField(value = "object_property_type_code")
    @NotNull(message = "对象属性类型不能为空")
    @Schema(description = "对象属性类型")
    private String objectPropertyTypeCode;
    /**
     * 是否枚举字段 TRUE:是 FALSE:否
     */
    @TableField(value = "is_enumeration")
    @Schema(description = "是否枚举字段")
    private String isEnumeration;
    /**
     * 是否状态 TRUE:是 FALSE:否
     */
    @TableField(value = "is_status")
    @Schema(description = "是否状态")
    private String isStatus;
    /**
     * 是否主键 TRUE:是 FALSE:否
     */
    @TableField(value = "is_primary_key")
    @Schema(description = "是否主键")
    private String isPrimaryKey;
    /**
     * 字段更新是否前端显示 TRUE:是 FALSE:否
     */
    @TableField(value = "is_record_version")
    @Schema(description = "字段更新是否前端显示")
    private String isRecordVersion;
    /**
     * 对象属性别名
     */
    @TableField(value = "object_property_alias")
    @Schema(description = "对象属性别名")
    private String objectPropertyAlias;
    /**
     * 排序
     */
    @TableField(value = "order_number")
    @NotNull(message = "排序不能为空")
    @Schema(description = "排序")
    private Long orderNumber;
    /**
     * 主体生命周期 CURRENTLY_VALID:当前有效 EDITING:正在编辑 ARCHIVING:历史存档
     */
    @TableField(value = "subject_life_cycle")
    @NotNull(message = "主体生命周期不能为空")
    @Schema(description = "主体生命周期")
    private String subjectLifeCycle;
    /**
     * 是否存档 TRUE:是 FALSE:否
     */
    @TableField(value = "is_archive")
    @NotNull(message = "是否存档不能为空")
    @Schema(description = "是否存档")
    private String isArchive;
    /**
     * 操作人就职记录ID
     */
    @TableField(value = "operation_induction_id")
    @NotNull(message = "操作人就职记录ID不能为空")
    @Schema(description = "操作人就职记录ID")
    private String operationInductionId;
    /**
     * 创建人就职记录ID
     */
    @TableField(value = "create_induction_id")
    @NotNull(message = "创建人就职记录ID不能为空")
    @Schema(description = "创建人就职记录ID")
    private String createInductionId;
    /**
     * 发布人就职记录ID
     */
    @TableField(value = "release_induction_id")
    @Schema(description = "发布人就职记录ID")
    private String releaseInductionId;
    /**
     * 存档人就职记录ID
     */
    @TableField(value = "archive_induction_id")
    @Schema(description = "存档人就职记录ID")
    private String archiveInductionId;
    /**
     * 操作时间
     */
    @TableField(value = "operate_time")
    @NotNull(message = "操作时间不能为空")
    @Schema(description = "操作时间")
    private Date operateTime;
    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @NotNull(message = "创建时间不能为空")
    @Schema(description = "创建时间")
    private Date createTime;
    /**
     * 发布时间
     */
    @TableField(value = "release_time")
    @Schema(description = "发布时间")
    private Date releaseTime;
    /**
     * 存档时间
     */
    @TableField(value = "archive_time")
    @Schema(description = "存档时间")
    private Date archiveTime;
    /**
     * 是否作废 TRUE:是 FALSE:否
     */
    @TableField(value = "is_valid")
    @NotNull(message = "是否作废不能为空")
    @Schema(description = "是否作废")
    private String isValid;
    /**
     * 创建于空间ID
     */
    @TableField(value = "space_id")
    @NotNull(message = "创建于空间ID不能为空")
    @Schema(description = "创建于空间ID")
    private String spaceId;
    /**
     * 创建于联盟应用ID
     */
    @TableField(value = "app_id")
    @NotNull(message = "创建于联盟应用ID不能为空")
    @Schema(description = "创建于联盟应用ID")
    private String appId;
}
